﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TMIS.BLL
{
    public class TopicsStatistics
    {
        /// <summary>
        /// 获取专业对应ID
        /// </summary>
        /// <returns></returns>
        public Guid GetProfessionID(string profession)
        {
            DAL.Profession dal = DALFactory.DALFactory.CreateProfession();
            return dal.Search(profession);
        }
        /// <summary>
        /// 获取年级对应ID
        /// </summary>
        /// <param name="grade"></param>
        /// <returns></returns>
        public Guid GetGradeID(string grade)
        {
            DAL.Grade dal = DALFactory.DALFactory.CreateGrade();
            return dal.Search(grade);
        }
        /// <summary>
        /// 获取所有专业名称
        /// </summary>
        /// <returns></returns>
        public string[] GetProfession()
        {
            DAL.Profession dal = DALFactory.DALFactory.CreateProfession();
            return dal.Search();
        }
        /// <summary>
        /// 获取指定专业号对应的年级名称
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        public string[] GetGrade(Guid guid)
        {
            DAL.Grade dal = DALFactory.DALFactory.CreateGrade();
            return dal.Search(guid);
        }
    }
}
